// src/server.js
const http = require('http');
const app = require('./app');
const { loadPlanetsData } = require('./models/planets.model');
const PORT = process.env.PORT || 8001;
const server = http.createServer(app);
// 加载⾏星数据并启动服务器
async function startServer() {
 await loadPlanetsData();
 server.listen(PORT, () => {
 console.log(`NASA-API运⾏于${PORT}端⼝〜`);
 });
}
startServer();